import { lift } from 'ramda'

import { ExtractSuccess } from '@core/types'
import { selectors } from 'data'
import { RootState } from 'data/rootReducer'

export const getData = (state: RootState) => {
  const orderR = selectors.components.buySell.getBSOrder(state)

  return lift((order: ExtractSuccess<typeof orderR>) => ({
    order
  }))(orderR)
}
